home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1723 < prev    next >
Mailbox/MIME Entity  |  1996-08-06  |  1.9 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 73 6f | 61 70 2e 6e 65 77 73 2e |Path: so|ap.news.|
|00000010| 70 69 70 65 78 2e 6e 65 | 74 21 70 69 70 65 78 21 |pipex.ne|t!pipex!|
|00000020| 75 73 65 6e 65 74 0a 46 | 72 6f 6d 3a 20 22 44 2e |usenet.F|rom: "D.|
|00000030| 53 2e 20 4d 65 61 72 22 | 20 3c 66 70 35 33 40 64 |S. Mear"| <fp53@d|
|00000040| 69 61 6c 2e 70 69 70 65 | 78 2e 63 6f 6d 3e 0a 4e |ial.pipe|x.com>.N|
|00000050| 65 77 73 67 72 6f 75 70 | 73 3a 20 63 6f 6d 70 2e |ewsgroup|s: comp.|
|00000060| 6c 61 6e 67 2e 63 2b 2b | 0a 53 75 62 6a 65 63 74 |lang.c++|.Subject|
|00000070| 3a 20 52 65 3a 20 54 68 | 65 6f 72 65 74 69 63 61 |: Re: Th|eoretica|
|00000080| 6c 20 43 2b 2b 20 51 75 | 65 73 74 69 6f 6e 0a 44 |l C++ Qu|estion.D|
|00000090| 61 74 65 3a 20 31 32 20 | 4a 61 6e 20 31 39 39 36 |ate: 12 |Jan 1996|
|000000a0| 20 31 35 3a 33 35 3a 32 | 37 20 47 4d 54 0a 4f 72 | 15:35:2|7 GMT.Or|
|000000b0| 67 61 6e 69 7a 61 74 69 | 6f 6e 3a 20 55 6e 69 70 |ganizati|on: Unip|
|000000c0| 61 6c 6d 50 49 50 45 58 | 20 73 65 72 76 65 72 20 |almPIPEX| server |
|000000d0| 28 70 6f 73 74 20 64 6f | 65 73 6e 27 74 20 72 65 |(post do|esn't re|
|000000e0| 66 6c 65 63 74 20 76 69 | 65 77 73 20 6f 66 20 55 |flect vi|ews of U|
|000000f0| 6e 69 70 61 6c 6d 50 49 | 50 45 58 29 0a 4d 65 73 |nipalmPI|PEX).Mes|
|00000100| 73 61 67 65 2d 49 44 3a | 20 3c 34 64 35 76 33 76 |sage-ID:| <4d5v3v|
|00000110| 24 62 61 62 40 73 6f 61 | 70 2e 6e 65 77 73 2e 70 |$bab@soa|p.news.p|
|00000120| 69 70 65 78 2e 6e 65 74 | 3e 0a 52 65 66 65 72 65 |ipex.net|>.Refere|
|00000130| 6e 63 65 73 3a 20 3c 34 | 64 31 35 32 62 24 64 64 |nces: <4|d152b$dd|
|00000140| 32 24 31 40 6d 68 61 66 | 63 2e 70 72 6f 64 75 63 |2$1@mhaf|c.produc|
|00000150| 74 69 6f 6e 2e 63 6f 6d | 70 75 73 65 72 76 65 2e |tion.com|puserve.|
|00000160| 63 6f 6d 3e 0a 4e 4e 54 | 50 2d 50 6f 73 74 69 6e |com>.NNT|P-Postin|
|00000170| 67 2d 48 6f 73 74 3a 20 | 61 6e 30 36 30 2e 64 75 |g-Host: |an060.du|
|00000180| 2e 70 69 70 65 78 2e 63 | 6f 6d 0a 4d 69 6d 65 2d |.pipex.c|om.Mime-|
|00000190| 56 65 72 73 69 6f 6e 3a | 20 31 2e 30 0a 43 6f 6e |Version:| 1.0.Con|
|000001a0| 74 65 6e 74 2d 54 79 70 | 65 3a 20 74 65 78 74 2f |tent-Typ|e: text/|
|000001b0| 70 6c 61 69 6e 3b 20 63 | 68 61 72 73 65 74 3d 75 |plain; c|harset=u|
|000001c0| 73 2d 61 73 63 69 69 0a | 43 6f 6e 74 65 6e 74 2d |s-ascii.|Content-|
|000001d0| 54 72 61 6e 73 66 65 72 | 2d 45 6e 63 6f 64 69 6e |Transfer|-Encodin|
|000001e0| 67 3a 20 37 62 69 74 0a | 58 2d 4d 61 69 6c 65 72 |g: 7bit.|X-Mailer|
|000001f0| 3a 20 4d 6f 7a 69 6c 6c | 61 20 31 2e 31 20 28 57 |: Mozill|a 1.1 (W|
|00000200| 69 6e 64 6f 77 73 3b 20 | 49 3b 20 31 36 62 69 74 |indows; |I; 16bit|
|00000210| 29 0a 54 6f 3a 20 37 31 | 31 37 32 2e 32 30 32 35 |).To: 71|172.2025|
|00000220| 40 43 6f 6d 70 75 53 65 | 72 76 65 2e 43 4f 4d 0a |@CompuSe|rve.COM.|
|00000230| 0a 43 2b 2b 20 70 72 69 | 6e 63 69 70 6c 65 73 20 |.C++ pri|nciples |
|00000240| 67 65 6e 65 72 61 6c 6c | 79 20 72 65 6d 6f 76 65 |generall|y remove|
|00000250| 20 74 68 65 20 6e 65 65 | 64 20 66 6f 72 20 65 78 | the nee|d for ex|
|00000260| 70 6c 69 63 69 74 6c 79 | 20 64 65 63 6c 61 72 69 |plicitly| declari|
|00000270| 6e 67 20 0a 66 75 6e 63 | 74 69 6f 6e 20 70 6f 69 |ng .func|tion poi|
|00000280| 6e 74 65 72 73 20 28 61 | 66 74 65 72 20 61 6c 6c |nters (a|fter all|
|00000290| 2c 20 74 68 61 74 20 69 | 73 20 65 78 61 63 74 6c |, that i|s exactl|
|000002a0| 79 20 77 68 61 74 20 76 | 2d 74 61 62 6c 65 73 20 |y what v|-tables |
|000002b0| 61 72 65 29 2e 20 55 73 | 69 6e 67 20 0a 43 2b 2b |are). Us|ing .C++|
|000002c0| 20 6d 65 74 68 6f 64 73 | 20 79 6f 75 20 77 6f 75 | methods| you wou|
|000002d0| 6c 64 20 67 65 6e 65 72 | 61 6c 6c 79 20 6f 76 65 |ld gener|ally ove|
|000002e0| 72 69 64 65 20 66 75 6e | 63 74 69 6f 6e 73 20 69 |ride fun|ctions i|
|000002f0| 6e 20 64 65 72 69 76 65 | 64 20 63 6c 61 73 73 65 |n derive|d classe|
|00000300| 73 20 74 6f 20 0a 61 63 | 68 69 65 76 65 20 74 68 |s to .ac|hieve th|
|00000310| 65 20 73 61 6d 65 20 72 | 65 73 75 6c 74 73 2e 20 |e same r|esults. |
|00000320| 54 68 65 20 62 61 73 69 | 63 20 70 72 6f 62 6c 65 |The basi|c proble|
|00000330| 6d 20 69 73 20 74 68 61 | 74 20 69 6e 68 65 72 65 |m is tha|t inhere|
|00000340| 6e 74 20 69 6e 20 63 6c | 61 73 73 20 0a 66 75 6e |nt in cl|ass .fun|
|00000350| 63 74 69 6f 6e 73 20 69 | 73 20 61 20 68 69 64 64 |ctions i|s a hidd|
|00000360| 65 6e 20 70 6f 69 6e 74 | 65 72 20 74 6f 20 74 68 |en point|er to th|
|00000370| 65 20 63 6c 61 73 73 20 | 69 6e 73 74 61 6e 63 65 |e class |instance|
|00000380| 2e 20 54 68 69 73 20 6d | 65 61 6e 73 20 74 68 61 |. This m|eans tha|
|00000390| 74 20 74 68 65 20 0a 6d | 61 6e 67 6c 65 64 20 6e |t the .m|angled n|
|000003a0| 61 6d 65 20 69 73 20 64 | 69 66 66 65 72 65 6e 74 |ame is d|ifferent|
|000003b0| 20 74 6f 20 77 68 61 74 | 20 79 6f 75 20 6d 69 67 | to what| you mig|
|000003c0| 68 74 20 65 78 70 65 63 | 74 2e 20 49 66 20 6f 76 |ht expec|t. If ov|
|000003d0| 65 72 69 64 69 6e 67 20 | 74 68 65 20 0a 66 75 6e |eriding |the .fun|
|000003e0| 63 74 69 6f 6e 73 20 64 | 6f 65 73 20 6e 6f 74 20 |ctions d|oes not |
|000003f0| 67 69 76 65 20 74 68 65 | 20 61 6e 73 77 65 72 20 |give the| answer |
|00000400| 61 6e 64 20 79 6f 75 20 | 72 65 61 6c 6c 79 20 2a |and you |really *|
|00000410| 6d 75 73 74 2a 20 75 73 | 65 20 66 75 6e 63 74 69 |must* us|e functi|
|00000420| 6f 6e 20 0a 70 6f 69 6e | 74 65 72 73 20 79 6f 75 |on .poin|ters you|
|00000430| 20 70 6f 73 73 69 62 6c | 65 20 64 6f 20 6e 6f 74 | possibl|e do not|
|00000440| 20 6e 65 65 64 20 74 6f | 20 72 65 66 65 72 65 6e | need to| referen|
|00000450| 63 65 20 6e 6f 6e 2d 73 | 74 61 74 69 63 20 6d 65 |ce non-s|tatic me|
|00000460| 6d 62 65 72 73 20 69 6e | 20 74 68 65 20 0a 63 6c |mbers in| the .cl|
|00000470| 61 73 73 20 69 6e 20 77 | 68 69 63 68 20 63 61 73 |ass in w|hich cas|
|00000480| 65 20 79 6f 75 20 63 61 | 6e 20 75 73 65 20 27 73 |e you ca|n use 's|
|00000490| 74 61 74 69 63 27 20 61 | 73 20 61 20 6d 6f 64 69 |tatic' a|s a modi|
|000004a0| 66 69 65 72 20 74 6f 20 | 74 68 65 20 76 61 72 69 |fier to |the vari|
|000004b0| 6f 75 73 20 0a 66 75 6e | 63 74 69 6f 6e 73 20 74 |ous .fun|ctions t|
|000004c0| 68 61 74 20 79 6f 75 20 | 6e 65 65 64 20 74 6f 20 |hat you |need to |
|000004d0| 70 6f 69 6e 74 20 74 6f | 20 69 6e 20 74 68 65 20 |point to| in the |
|000004e0| 63 6c 61 73 73 2e 20 54 | 68 69 73 20 72 65 6d 6f |class. T|his remo|
|000004f0| 76 65 73 20 74 68 65 20 | 0a 68 69 64 64 65 6e 20 |ves the |.hidden |
|00000500| 70 6f 69 6e 74 65 72 20 | 61 6e 64 20 61 6c 6c 6f |pointer |and allo|
|00000510| 77 73 20 79 6f 75 20 74 | 6f 20 75 73 65 20 74 68 |ws you t|o use th|
|00000520| 65 20 66 75 6e 63 74 69 | 6f 6e 73 20 70 72 65 74 |e functi|ons pret|
|00000530| 74 79 20 77 65 6c 6c 20 | 61 73 20 69 66 20 79 6f |ty well |as if yo|
|00000540| 75 20 0a 77 65 72 65 20 | 75 73 69 6e 67 20 43 2e |u .were |using C.|
|00000550| 20 4e 6f 74 65 20 68 6f | 77 65 76 65 72 20 74 68 | Note ho|wever th|
|00000560| 61 74 20 62 65 63 61 75 | 73 65 20 74 68 65 20 63 |at becau|se the c|
|00000570| 6c 61 73 73 20 69 6e 73 | 74 61 6e 63 65 20 70 6f |lass ins|tance po|
|00000580| 69 6e 74 65 72 20 69 73 | 20 0a 6d 69 73 73 69 6e |inter is| .missin|
|00000590| 67 2c 20 6f 6e 6c 79 20 | 73 74 61 74 69 63 20 64 |g, only |static d|
|000005a0| 61 74 61 20 69 6e 20 74 | 68 65 20 63 6c 61 73 73 |ata in t|he class|
|000005b0| 20 63 61 6e 20 62 65 20 | 61 63 63 65 73 73 65 64 | can be |accessed|
|000005c0| 2e 20 28 54 68 65 20 63 | 6f 6d 70 69 6c 65 72 20 |. (The c|ompiler |
|000005d0| 0a 77 69 6c 6c 20 74 65 | 6c 6c 20 79 6f 75 20 69 |.will te|ll you i|
|000005e0| 66 20 79 6f 75 20 74 72 | 79 20 74 6f 20 76 69 6f |f you tr|y to vio|
|000005f0| 6c 61 74 65 20 74 68 69 | 73 20 72 75 6c 65 29 2e |late thi|s rule).|
|00000600| 20 4f 74 68 65 72 77 69 | 73 65 2c 20 73 74 69 63 | Otherwi|se, stic|
|00000610| 6b 20 74 6f 20 74 68 65 | 20 43 20 0a 63 6f 6e 73 |k to the| C .cons|
|00000620| 74 72 75 63 74 73 20 77 | 68 69 63 68 20 77 69 6c |tructs w|hich wil|
|00000630| 6c 20 67 65 6e 65 72 61 | 6c 6c 79 20 77 6f 72 6b |l genera|lly work|
|00000640| 20 69 6e 20 43 2b 2b 20 | 74 6f 6f 2e 0a 0a 54 68 | in C++ |too...Th|
|00000650| 65 20 6f 6e 65 20 74 69 | 6d 65 20 49 20 72 65 61 |e one ti|me I rea|
|00000660| 6c 6c 79 20 68 61 64 20 | 74 6f 20 64 6f 20 74 68 |lly had |to do th|
|00000670| 69 73 20 77 61 73 20 69 | 6e 20 77 72 69 74 69 6e |is was i|n writin|
|00000680| 67 20 44 4f 53 20 62 61 | 73 65 64 20 63 6f 6d 6d |g DOS ba|sed comm|
|00000690| 73 20 0a 73 6f 66 74 77 | 61 72 65 2c 20 61 6e 64 |s .softw|are, and|
|000006a0| 20 74 6f 20 62 65 20 68 | 6f 6e 65 73 74 2c 20 74 | to be h|onest, t|
|000006b0| 68 65 20 72 65 73 75 6c | 74 20 77 61 73 20 61 20 |he resul|t was a |
|000006c0| 62 69 74 20 6f 66 20 61 | 20 63 6c 75 64 67 65 2e |bit of a| cludge.|
|000006d0| 20 41 20 66 65 77 20 77 | 65 65 6b 73 20 0a 6c 61 | A few w|eeks .la|
|000006e0| 74 65 72 20 49 20 72 65 | 61 64 20 61 6e 20 61 72 |ter I re|ad an ar|
|000006f0| 74 69 63 6c 65 20 69 6e | 20 61 20 6d 61 67 61 7a |ticle in| a magaz|
|00000700| 69 6e 65 20 64 65 61 6c | 69 6e 67 20 77 69 74 68 |ine deal|ing with|
|00000710| 20 74 68 65 20 73 61 6d | 65 20 70 72 6f 62 6c 65 | the sam|e proble|
|00000720| 6d 20 61 6e 64 20 0a 63 | 6f 6d 69 6e 67 20 74 6f |m and .c|oming to|
|00000730| 20 74 68 65 20 73 61 6d | 65 20 63 6f 6e 63 6c 75 | the sam|e conclu|
|00000740| 73 69 6f 6e 2e 20 43 2b | 2b 20 69 73 20 6e 6f 74 |sion. C+|+ is not|
|00000750| 20 77 65 6c 6c 20 73 75 | 69 74 65 64 20 74 6f 20 | well su|ited to |
|00000760| 74 68 69 73 20 72 61 74 | 68 65 72 20 0a 73 70 65 |this rat|her .spe|
|00000770| 63 69 61 6c 69 73 65 64 | 20 74 61 73 6b 2e 0a 0a |cialised| task...|
|00000780| 47 6f 6f 64 20 6c 75 63 | 6b 2c 0a 0a 0a 44 61 76 |Good luc|k,...Dav|
|00000790| 65 20 4d 65 61 72 2e 0a | 0a |e Mear..|. |
+--------+-------------------------+-------------------------+--------+--------+